<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>政策文件内容</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="Public:iframe_header"/>
		<style type="text/css">
			*{
				font-size: 95%;
			}
			h4{
				margin: 20px;
				width: 80%;
				font-size: 93%;
			}
			table{
				width: 90%;
				text-align: center;
	            margin: 30px auto;
	            border-collapse: separate;
	            border-spacing: 0;
	            border: 2px #000;
				border: 1px solid #AAAAAA;
				border-radius: 10px;
			}
			table tr:first-child {
				border: 10px 0 0 10px;
	 		/*border-top-left-radius: 10px;
			border-top-right-radius: 10px;*/
            background-color: #0DC0D6;
        }
			   table tr:first-child td:first-child {
            border-top-left-radius: 10px;
        }

        table tr:first-child td:last-child {
            border-top-right-radius: 10px;
        }
        table tr:last-child td:first-child {
            border-bottom-left-radius: 10px;
        }

        table tr:last-child td:last-child {
            border-bottom-right-radius: 10px;
        }
        
        p{
        	text-indent:2em;
        	text-align: left;
    		 width: 95%;
    		 margin: 5px auto;
    		 padding: 1px;
        }
        .d-fot{
        	margin: 20px;
        	text-align: left;
        	
        }
        .but{
        	text-align: center;
        	margin: auto;
        }
        .but1,.but2{
        	border-radius: 15px;
        	margin: auto 30px;
        }
        .but1{
        	background-color: orange;
        }
        .but2{
        	background-color: #0DC0D6;
        }
        .content{
        	text-align: center;
        }
        .content *{
        	width: 95%;
        }
		</style>
	</head>

	<body>
		<div class="mui-content" align="center" style="background-color: #fff;">
		    <h4>{$data.title}</h4>
		    <table border="0" cellspacing="0" cellpadding="0">
		    	<tr>
		    		<td>生效时间</td>
		    		<td>{$data.take_time|date="Y-m-d",###}</td>
		    		<td>有效期</td>
		    		<td>{$data.add_content}</td>
		    	</tr>
		    	<tr>
		    		<td>发文部门</td>
		    		<td>{$data.department}</td>
		    		<td>所属地区</td>
		    		<td>{$data.area}</td>
		    	</tr>
		    	<tr>
		    		<td>文件文号</td>
		    		<td>{$data.file_num}</td>
		    		<td>关键字</td>
		    		<td>{$keyword.keywords}</td>
		    	</tr>
		    </table>
		    
		    <div class="content">
				{$data.content}
		    </div>
		    <div class="d-fot">
		    	附件:<br />
		    	<a href="#">{$data.file_name}</a>
		    	<div class="but">
		    		<button class="but1"><a href="javascript:void(0)" onclick="view()">预览</a></button>
		    		<button class="but2"><a href="javascript:void(0)" onclick="down()">下载</a></button>
		    	</div>
		    </div>
		</div>
		<script>
			function view(){
				$.ajax({
					url:"{:url('Policy/pdf_preview_cotinue')}",
					type:'POST',
					data:'',
					async:true,
					success:function(result){
						if(result.code == '0'){
							parent.tips(result.msg);
							return false;
						}else{
							index = layer.open({
							  type: 1
							  ,content: '<iframe style="width:100%;height:100%" src="{:url(\'Policy/pdf_preview\',array(\'id\'=>$id))}"></iframe>'
							  ,area:["100%","100%"]
							  ,style: 'position:fixed; bottom:0; left:0; width: 100%; height:100%; border:none;'
							});
							$(".layui-m-layercont").css({width:'100%',height:'100%'});
						}
					}
				});
			}
	
			function down(){
				$.ajax({
					url:"{:url('Policy/down_continue',array('id'=>$id))}",
					type:'POST',
					data:'',
					async:true,
					success:function(result){
						if(result.code == '0'){
							parent.tips(result.msg);
							return false;
						}else{
							document.location.href="{:url('Policy/down_pdf',array('id'=>$id))}";
						}
					}
	
				});
			}
		</script>
	</body>
</html>